<?php

defined('JPATH_BASE') or die;

abstract class JHtmlExercise {

    protected static $loaded = array();

    public static function stylesheet() {
        if (!empty(self::$loaded[__METHOD__])) {
            return;
        }

        $document = JFactory::getDocument();
        $document->addStylesheet(JURI::root(true) . '/administrator/components/com_exercises/assets/css/screen.css', 'text/css', null);
        self::$loaded[__METHOD__] = true;

        return;
    }

    public static function jquery() {
        if (!empty(self::$loaded[__METHOD__])) {
            return;
        }


        $document = JFactory::getDocument();
        $document->addScript(JURI::root(true) . '/administrator/components/com_exercises/assets/js/lib.js');
        $document->addScript(JURI::root(true) . '/administrator/components/com_exercises/assets/js/jlibs.js');
        $document->addScript(JURI::root(true) . '/administrator/components/com_exercises/assets/js/common.js');


        self::$loaded[__METHOD__] = true;

        return;
    }

}
